home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / TECHNICA / AUTOCAD / H107.ZIP / SHRM18G.ZIP / SHROOM.DOC < prev   
Text File  |  1991-09-14  |  18KB  |  408 lines

  1.  
  2.     shroom.doc    - readme file for Shell Room Utility
  3.  
  4.     Copyright (C) Davis Augustine 1990, 1991.  All rights reserved.
  5.  
  6.     Last Modified:    14sep91.  Version 1.8g
  7.  
  8. Files
  9. -----
  10.     SHROOM.COM    - The program.
  11.     SHROOM.DOC    - This documentation file.
  12.  
  13. Description
  14. -----------
  15.     SHROOM is a utility that gives a DOS application's shells more
  16.     room.  It does this by intercepting the shell operation,
  17.     swapping out the application program, freeing up the memory,
  18.     and then performing the shell operation.  It also
  19.     intercepts the exit from the shell, so that it can swap
  20.     the application back in before returning to it.  The program
  21.     is none the wiser.
  22.  
  23. Features
  24. --------
  25.      o    Easy to use.
  26.      o    Detects swap file overflow (disk full) and asks whether you want
  27.     to abort back to the application or continue with a partial swap.
  28.      o    Detects TSR loading and unloading during the shell.  Frees
  29.     the TSR's resources and puts a warning message.
  30.      o    Small resident size (about 6k).  Frees nearly all of the memory.
  31.      o    Allows you to increase COMMAND.COM's environment size.
  32.      o    Works with all major DOS applications.
  33.      o    Fully user specifiable swap file path.    Ie., you can put
  34.     it on a virtual disk.
  35.      o    Swaps allocated memory only, avoiding unnecessary writes
  36.     and reads of free memory.
  37.      o    Intelligent command line parsing.  Searches DOS's PATH
  38.     for program to load, allows passing of args to the program.
  39.     Automatically tries .COM and .EXE extensions if not
  40.     specified by user.
  41.      o    Verbose mode for inquisitive users.
  42.      o    Quiet mode for apathetic users.
  43.      o    Uses DOS "make temp file" facility to prevent network clashes.
  44.  
  45.  
  46. Installation and Operation
  47. --------------------------
  48.      o    To install, just copy SHROOM.COM into a directory in your PATH
  49.     or the directory from which you will run the application.
  50.      o    For help, use the question mark switch, eg. "shroom -?".
  51.      o    To load, just type the normal command used to invoke the
  52.     application, with "shroom " prepended.  Eg, if the application
  53.     is called "edit", then you would use the command "shroom edit".
  54.     Arguments are passed to the application just as before, so eg.
  55.     you can say "shroom edit letter.doc".
  56.      o    To shell out, use whatever shell command is provided by the
  57.     application.  You will see a message from Shroom saying that it
  58.     is swapping the program out, after which the normal shell prompt
  59.     and actions will appear.  When you exit the shell, you will
  60.     again see the "swapping" message from Shroom and then be
  61.     deposited back into the application as usual.
  62.  
  63.  
  64. Help Screen - Displayed by the "-?" switch:
  65. -------------------------------------------
  66.  
  67. Usage:     shroom [-?hLnpqv] [-e #] [-s path] [-t targets] [-z #] prog [args]
  68.        -?h : print this help message
  69.     -L : display shareware license
  70.     -n : display program notes
  71.     -p : proceed (without asking) with partial swap if disk full
  72.     -q : quiet mode - display error messages only
  73.     -v : verbose mode - provide running commentary
  74.       -e # : set ERRORLEVEL returned if unable to load prog (default = 254)
  75.    -s path : specify DRIVE:DIR in which to create swap file
  76.   -t targs : specify which shell programs cause swapping
  77.       -z # : specify environment size for COMMAND.COM
  78.       prog : application program to execute
  79.       args : command line to pass to the application
  80.  
  81. Example:   shroom  -p  -e 99  -s E:\  -z 800  wp  letter
  82.  
  83.  
  84. Notes Screen - Displayed by the "-n" switch:
  85. --------------------------------------------
  86.           ********** NOTES **********
  87.  
  88. PROGRAM LOADING:
  89.     The application must be a .EXE or .COM file.  You can leave off the
  90. file extension and Shroom will try to find a matching .COM or .EXE file.
  91. Shroom searches for the application program first in the current directory,
  92. then in Shroom's home directory, and finally in the directories of the
  93. PATH environment string.
  94.  
  95.  
  96. SHROOM SWITCHES AND ARGUMENTS:
  97.     All text surrounded by square brackets, as in "[-hnv]", is optional.
  98. Switches can be given in any order, and can be in upper or lower case,
  99. and may be separated by spaces (or not). The space between a switch and
  100. its argument is optional, ie. you can say "-z800" or "-z 800".
  101. Although all our examples use dashes as the switch character, a slash
  102. can also be used: eg. "Shroom /v /p ...".
  103.  
  104.  
  105. ENVIRONMENT SIZE:
  106.     Many people have run into the following problem: you type the command
  107. "SET MYVAR=WHATEVER" and get back the message "Out of environment space."
  108. This occurs when a TSR is loaded or while a .BAT file is running. You get
  109. around this by adding a line like "SHELL=C:\COMMAND.COM /E:2000" to your
  110. CONFIG.SYS file, thus increasing the minimum environment space to 2000
  111. bytes. However, when you shell out from an application and then run a
  112. .BAT file, you find that the environment size has again been restricted
  113. and the CONFIG.SYS line has no effect.
  114.  
  115.     What you need is the amazing new "-z #" switch from Shroom. It causes
  116. Shroom to append the string " /E:#" to COMMAND.COM's command line, thus
  117. setting the desired minimum environment space for the new shell. Note that
  118. in DOS 3.0 and earlier versions, # is the size in paragraphs. In later
  119. versions it is in bytes.
  120.  
  121.  
  122. EXIT RETURN CODES:
  123.     Shroom exits immediately if it cannot load the application, returning
  124. an ERRORLEVEL of 254, unless you have changed the value with the "-e errlevel"
  125. switch.  If it can load the application, then it exits when the application
  126. does, and returns the application's exit code.
  127.  
  128.  
  129. SWAP FILE:
  130.     Shroom stores the application in a temporary swap file during the
  131. shell.  Typically the name of the file will be a nonsensical string
  132. of letters and numbers.  When you exit from the shell, Shroom reads
  133. the file back in and then deletes it.  Obviously, you should not delete,
  134. rename or otherwise modify the swap file while you are in the shell.
  135. If you crash the system while in the shell, then the swap file will still
  136. be there after you reboot (unless you were using a ram disk), and it is
  137. a good idea to delete it then.
  138.  
  139.     Shroom (among many other programs) looks for the environment variable
  140. TEMP at startup.  If TEMP is defined, then Shroom takes its definition
  141. as the default location of the swap file.  If TEMP is not defined, then
  142. the current directory becomes the default swap file location.  If you
  143. give the -s DRIVE:DIR switch on the command line, then that overrides
  144. the default location.  The swap file location is determined only once,
  145. during Shroom's startup.  Changing your current drive or directory while
  146. in the application or a shell will not affect where the swap file goes.
  147. Finally, if you have a ram disk with enough room, it makes an excellent
  148. home for the Shroom swap file.  It is fast and "self-deleting" if you
  149. crash the PC.
  150.  
  151.  
  152. TARGET LIST:
  153.     (Most people don't need to worry about this.) When Shroom notices
  154. that a program is being shelled, it checks the name of that program
  155. against the target list. If it is in the list, then Shroom goes ahead
  156. and does its thing, swapping the application and freeing its memory.
  157. If the shelled program is not in the target list, then Shroom lets the
  158. program load and execute normally without any swapping.
  159.  
  160.     The purpose of the target list is to prevent unwanted swapping.  There
  161. are a few applications which "shell" their own overlays, and if Shroom
  162. swapped them then the overlays wouldn't have anyone to talk to!
  163.  
  164.     The -t switch takes a list of filenames separated by commas. The file
  165. names are case independent and should not have drive or directory paths.
  166. The default target list is automatically taken from the COMSPEC
  167. environment string, so it will consist of the name of your shell program.
  168. For standard DOS users, that is "COMMAND.COM". For others it may be
  169. "4DOS.COM" or "SH.EXE", or whatever. If you use more than one shell
  170. program, then you will need to use Shroom's -t switch to cause swapping
  171. on both of them. For example: "shroom -t command.com,4dos.com ...". An
  172. easier way is to use the wildcard target list, "-t *", which causes
  173. Shroom to always swap on all shell operations. This will work with most
  174. applications. If it doesn't, you will know right away.
  175.  
  176.  
  177. APPLICATIONS THAT DO "BACKGROUND PROCESSING":
  178.     You may have a communications package which allows you to initiate a
  179. file transfer and then shell out to do other things.  This will probably
  180. not work if the package was Shroom'ed, because the application is actually
  181. unloaded from memory (and from the interrupt vector table) during the
  182. shell.  The background processing code will not be there anymore!
  183.  
  184.  
  185. ENVIRONMENTAL IMPACT:
  186.     Shroom is processor (8086, 286, 386, etc) independent.  It does not do
  187. any floating point.  It doesn't care about or use expanded or extended
  188. memory (a future version will be able to swap to extended mem).  It works
  189. with DOS Extender (eg. Pharlap) based applications.  It may work in the
  190. Windows, Desqview and other pseudo or real multi-tasking environments, but
  191. you're basically on your own (caveat sharer).
  192.  
  193.  
  194. LOADING TSR'S INSIDE SHELLS:
  195.     In general, it is not safe to load a TSR while shelled out of an
  196. application, unless you delete the TSR before exiting the shell.  A
  197. variety of memory and interrupt handling problems can occur.  This
  198. is true even when you are not using Shroom.  If you are using Shroom,
  199. then any TSR's that were loaded during the shell will be automatically
  200. unloaded when you return to the application.  If a TSR was loaded "high",
  201. then it will stay loaded high but may cause problems if it uses any
  202. interrupts that the application uses.  Shroom displays the message:
  203. "WARNING: Interrupt ## used by application, changed in shell." if that
  204. occurs.
  205.  
  206.  
  207. UNLOADING TSR'S INSIDE SHELLS:
  208.     The sequence in mind is: You Load a TSR, enter an application,
  209. shell out, then unload the TSR.  The main danger in doing this is that
  210. unloading the TSR may restore interrupt vectors that the application
  211. had remapped.  The chain would be changed from TABLE->APP->TSR->SYSTEM
  212. to TABLE->SYSTEM, thus "cutting out" the app.  Fortunately, Shroom is
  213. able to detect when this occurs.  If you see the message "WARNING: 
  214. Interrupt ## used by application, changed in shell", then that is what
  215. happened.  You should probably save your changes to a new temp file if
  216. possible, and exit the application.  You're not guaranteed to be able
  217. to do this, so be sure to hold your breath.
  218.  
  219.     You don't really need to know what interrupts are or understand any
  220. of the above.  The bottom line is: don't play with TSR's when shelled
  221. out of an application.  If you can't resist the urge to, then at least
  222. Shroom will provide some insurance by catching and attempting to deal
  223. with conflicts when they occur.
  224.  
  225.  
  226. REPORTING BUGS:
  227.     If Shroom is not working as advertised for you, please tell me about
  228. it and I'll try to fix it.  Shroom problems are usually due to conflicts
  229. with other software packages.  You should send a problem report via
  230. regular or electronic mail with a description of the malfunction and
  231. a listing of your CONFIG.SYS and AUTOEXEC.BAT files.  You may also be
  232. asked to send a copy of the misbehaving application so that I can debug
  233. with it.  (It usually takes more time to obtain the software and/or
  234. reproduce the bug than it does to fix it.)
  235.  
  236.  
  237. Shareware License - Displayed by the "-L" switch:
  238. -------------------------------------------------
  239.  
  240.       ********** SHROOM SHAREWARE LICENSE **********
  241.  
  242.  This is a copyrighted software work which is distributed as shareware.
  243.  Under this license agreement you are granted the right to use Shroom
  244.  on all machines and environments that it supports.  You are also
  245.  free (and encouraged) to pass copies of this shareware on to others
  246.  as long as it is not for payment and not bundled with anything else
  247.  that is for payment.
  248.  
  249.  To become a registered user and receive immediate notice of updates,
  250.  please send a registration fee by check or money order of $25 to:
  251.  
  252.            Davis Augustine
  253.            P.O. Box 390178
  254.            Cambridge, MA. 02139
  255.  
  256.  Commercial distribution licenses, source code and customized versions
  257.  are also available at reasonable rates.  Please write to the above address
  258.  or send me email at CompuServe id 72230,3053.    I would also appreciate any
  259.  comments, questions, suggestions or bug reports.  This release of Shroom
  260.  can currently be found in CompuServe forums WPSGA, lib 9, and IBMSYS, lib 3.
  261.  
  262.  
  263.         ----------------------
  264.         |  REVISION HISTORY  |
  265.         ----------------------
  266.  
  267.  
  268. Changes in v1.8g (14sep91)
  269. -------------------------
  270.     Use TEMP environment string as default swap file location.
  271. Previously we used the current directory.  You still use the "-s PATH"
  272. switch to override the default.  (Thanks to users LC, ML).
  273.  
  274.     Start application with full path name, not just command name
  275. given (eg. C:\BIN\COOLPROG.EXE, not COOLPROG.EXE).  Makes Clipper
  276. work (was giving "overlay not found" error).  (Thanks to user LM).
  277.  
  278.     Make it work better with systems (such as MKS) where / (slash)
  279. is the path separator, instead of backslash.  Wasn't finding app if
  280. it was in same dir as Shroom.
  281.  
  282.     Detect and warn user when interrupts used by the application
  283. have been changed in the Shell, apparently by unloading a TSR.  Improve
  284. TSR detection and deciding when to unload it and when not.
  285.  
  286.     Changes to interrupt handling to work better with PC NFS and
  287. some other software.
  288.  
  289.     Fix application startup so it is not fooled by APPEND.  If a
  290. directory containing app was APPENDED, Shroom would think app was in
  291. the current directory.  (Thanks to user DG).
  292.  
  293.     Add sections on TSR's and reporting bugs to notes.
  294.  
  295.     Make -q suppress startup message, too.  (For user ML).
  296.  
  297.     Show command being passed to app, besides app name (unless -q).
  298.  
  299.     If verbose, show exit codes from shells and from app.  Also
  300. if verbose, show swap file location at startup.
  301.  
  302.  
  303. Changes in v1.7d (14aug91)
  304. --------------------------
  305.     Fix problem with -z # switch when comline is not empty.  Was
  306. overwriting existing comline instead of inserting in front of it.
  307. (Thanks to user LH).
  308.  
  309.  
  310. Changes in v1.7b (6aug91)
  311. --------------------------
  312.     Fix problem with Fortran programs.  Was causing "Floating point
  313. not loaded" error at application load time.  Hey, don't blame me, the
  314. bug is in the Fortran startup code!  (Thanks to users RS and DF).
  315.  
  316.     Disable control-C during swapping.  Would cause system hang and
  317. other strange behavior (especially by the user!).
  318.  
  319.     Bring back group shareware registration, by popular demand.
  320.  
  321.  
  322. Changes in v1.6d (21jul91)
  323. --------------------------
  324.     Fix state saving and restoring to work better with other TSR's.
  325. With a few TSR's, system would reliably hang when you exited the
  326. application back to DOS, if a shroom swap occurred in the application.
  327. (Thanks to user ML)
  328.  
  329.  
  330. Changes in v1.6c (22jun91)
  331. --------------------------
  332.     Get default target list from the COMSPEC environment string. So, if
  333. you use a shell other than COMMAND.COM, Shroom will automatically recognize
  334. it.  (Thanks to user MB)
  335.  
  336.     Fix problem in 1.6b, where swapping may have not been done with
  337. some applications.  Was failing to handle lowercase shell names correctly.
  338.  
  339.  
  340. Changes in v1.6b (14jun91)
  341. --------------------------
  342.     Only swap out specified shell programs.  Default list is COMMAND.COM.
  343. Add -t switch to specify others. (Thanks to user LH)
  344.  
  345.     Add -z switch to allow increasing the environment space of
  346. COMMAND.COM. (Thanks to user DM)
  347.  
  348.     The -v switch as part of its verbosity shows the shell program being
  349. executed and its command line.
  350.  
  351.  
  352. Changes in v1.5d (3may91)
  353. --------------------------
  354.     Search for the application in Shroom's home directory, too.
  355. (Thanks to user CS)
  356.  
  357.  
  358. Changes in v1.5c (26apr91)
  359. --------------------------
  360.     Fix a bug in 1.5b, when checking for unswappable blocks.  Caused
  361. some applications to swap zero bytes.  (Thanks to user JG)
  362.  
  363.     Mention CompuServe home library in license.
  364.  
  365.  
  366. Changes in v1.5b (29mar91)
  367. --------------------------
  368.     Fix a bug in swapping.    Leave alone any high blocks that are
  369. allocated by TSR's.  This caused shells to hang when Shroom was used
  370. with some software (such as QCache).  (Thanks to user RM)
  371.  
  372.  
  373. Changes in v1.5a (24mar91)
  374. --------------------------
  375.     Add -q switch for quiet mode.  Suppresses the "SHROOM: swapping..."
  376. messages but still lets error messages through.
  377.  
  378.     Add -p switch to force partial swaps.  If Shroom is unable to
  379. swap all of the application out, it normally asks you whether you want
  380. to proceed with the shell or return to the application.  With the -p
  381. switch, it always proceeds with the shell without asking you.
  382.  
  383.     Add -e errorlevel switch to allow you to specify the exit value
  384. returned by Shroom if it is unable to load the application.  This allows
  385. you to choose a value which does not conflict with those returned by
  386. your other applications.  This feature is only useful to those who make
  387. serious use of "if ERRORLEVEL..." statements in DOS batch files.
  388. (Thanks to user WB)
  389.  
  390.     Add -n switch to show program notes, and add more information
  391. to the notes.  There is now a help screen (-h), a shareware license
  392. screen (-l) and a notes screen (-n).
  393.  
  394.     Properly delete the temporary swap file when the user aborts
  395. the shell on disk full error (ie. when you pick 'A' to return to the
  396. application).  In previous versions of Shroom, the file was never
  397. deleted, thus leaving temporary files with names like "0A982331" lying
  398. around.
  399.  
  400.  
  401. Changes in v1.4d (14mar91)
  402. --------------------------
  403.     Shroom returns the ERRORLEVEL of the application program which
  404. was executed.  If the application fails to execute, then Shroom returns
  405. an ERRORLEVEL of 2.  Previously, Shroom always returned ERRORLEVEL 0
  406. if the application was successfully executed.
  407.  
  408.